<template>
  <el-table
    :data="packageInfo"
  >
    <el-table-column
      prop="code"
      align="center"
      label="包件编号">
    </el-table-column>

    <el-table-column
      prop="name"
      align="center"
      label="包件名称">
    </el-table-column>

    <el-table-column
      prop="num"
      align="center"
      label="包件数量">
      <template slot-scope="scope">
        <span v-if="scope.row.num">{{ scope.row.num }}</span>
        <span v-else>/</span>
      </template>
    </el-table-column>

    <el-table-column
      prop="unit"
      align="center"
      label="单位">
      <template slot-scope="scope">
        {{ scope.row.unit | filterDataBaseDictionary }}
      </template>
    </el-table-column>

    <el-table-column
      prop="volume"
      align="center"
      label="单包件体积(m³)">
      <template slot-scope="scope">
        <span v-if="scope.row.volume">{{ scope.row.volume }}</span>
        <span v-else>/</span>
      </template>
    </el-table-column>

    <el-table-column
      prop="weight"
      align="center"
      label="单包件重量(kg)">
      <template slot-scope="scope">
        <span v-if="scope.row.weight">{{ scope.row.weight }}</span>
        <span v-else>/</span>
      </template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  props: {
    packageInfo: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {}
  }
}
</script>
